﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Demo.Framework.DataStructure.Heap
{
    public class Node :IComparable
    {
        public Node Left { get; set; }
        public Node Right { get; set; }
        public int Value { get; set; }

        public Node(int value) 
        {
            Value = value;
        }

        public override string ToString()
        {
            return Value.ToString();
        }

        public int CompareTo(object obj)
        {
            Node otherNode = obj as Node;
            return this.Value.CompareTo(otherNode.Value);
        }
    }
}
